<%-- 
    Document   : displayAllCourses
    Created on : Jun 24, 2011, 6:46:59 PM
    Author     : Bob
--%>
<%@page import="edu.gatech.gellinservlet.model.*"%>
<%@page import="edu.gatech.gellinservlet.presenter.*"%>
<jsp:useBean id="courseData" scope="application" class="edu.gatech.gellinservlet.model.CourseManager" />
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>All Courses - Lab Assistant Pro</title>
    </head>
    <body>
        <%@include file="pro_header.jsp" %>
        <%@include file="admin_list.jsp"%>

    <center>
        <h1>All Courses:</h1>
        <table border="1">
            <thead>
                <tr>
                    <th>Course Name:</th>
                    <th>Course ID:</th>
                </tr>
            </thead>
            <tbody>
                <% //print out all courses in course manager in a table
                for (Course c : courseData.getDataList())
                    {
                        out.println("<tr><td>");
                        out.println(c.getName());
                        out.println("</td><td>");
                        out.println(c.getID());
                        out.println("</td></tr>");
                    }%>
            </tbody>
        </table>
    </center>
    <% } //ends user_redirect else statement, html is included here %>
    <% } //ends verifySession.jsp, all html is included in else statment %>
    </body>
</html>
